﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="GroupSelector.aspx.cs" Inherits="Medianamik.UI.Web.ContentManagement.GroupSelector"
    MasterPageFile="~/Medianamik/MasterPages/MedianamikModalWindow.Master" EnableViewState="false" %>

<asp:Content ID="HeaderContentHolder" runat="server" ContentPlaceHolderID="HeaderContentHolder">
	<script type="text/javascript">
        //<![CDATA[
        function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function Cancel_Clicked()
        {
            var oWindow = GetRadWindow();
            oWindow.argument = null;
            oWindow.Close();
        }
        
        function Select_Clicked() {
            var arg = new Object();
            
            var lst = document.getElementById("<%= GroupList.ClientID %>");
            arg.NodeName = lst.options[lst.selectedIndex].text;
            arg.NodeTypeId = lst.value;
            
            var oWindow = GetRadWindow();
            oWindow.Close(arg);            
        }
        //]]>            
	</script>
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
	<fieldset>
		    <p>
		        <label><%= Resources("Medianamik_ModalWindows", "TypeSelector_LabelType")%> :</label>
		        <asp:DropDownList ID="GroupList" runat="server" CssClass="SelectList" style="width:300px;" DataTextField="TranslatedName" DataValueField="ID" />
		    </p>
		    <p>
		        <input type="button" class="Btn" value="<%= Resources("Medianamik_ModalWindows", "TypeSelector_BtnCreateElement")%>" onclick="Select_Clicked();" />&nbsp;&nbsp;<input type="button" class="Btn" value="<%= Resources("Medianamik_Global", "Cancel") %>" onclick="Cancel_Clicked();" />
		    </p>
	</fieldset>
</asp:Content>
